    Help for IniCon

Properties            Frequently Asked Questions

Registration Information

Order Form

Getting Custom Controls Written

Licensing Information

Description

Visual Basic custom control that makes INI file access simple.  No Windows API calls required.

File Name

INICON3.VBX, INICON16.OCX, INICON32.OCX

ActiveX / OCX Object Name

Mabry.IniConCtrl

ActiveX Compatility

VB 4.0 (32-bit) and 5.0

ActiveX Built With

Microsoft Visual C++ v4

ActiveX - Required DLLs

MFC40.DLL (October 6th, 1995 or later)

OLEPRO32.DLL  (October 6th, 1995 or later)

MSVCRT40.DLL  (September 29th, 1995 or later)

VBX Object Type

Init

VBX Compatibility

VB 2.0, 3.0 and 4.0 (16-bit)

VBX Built With

Microsoft Visual C++ v1.5

Remarks

IniCon should be placed on all forms where its functionality is required (including MDI forms and children).  IniCon can be placed directly on an MDI form.

Distribution Note    When you develop and distribute an application that uses this control, you should install the control file into the user's Windows SYSTEM directory.  The control file has version information built into it.  So, during installation, you should ensure that you are not overwriting a newer version.


IniCon Properties

Properties that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

*Application Property

*DeleteApp Property

*DeleteParm Property

Enabled Property

*Filename Property

Height Property

Left Property

Name Property

*Parameter Property

Parent Property

Tag Property

Top Property

*Value Property

*Version Property


Frequently Asked Questions

General Questions

How do I use IniCon?

Why do I get an empty string when reading an INI file with IniCon?


FAQ - How do I use IniCon?
How do I use IniCon?

Frequently Asked Questions

The Inicon control is surprisingly easy to use. All you have to do is set the Filename, Application, and Parameter properties, and the Value can then be read or set--that's it!

Here is a simple example that is close to what you requested. The project is a Form with two Labels and the Inicon control. It reads two values on Form_Load and writes two values on Form_Unload. Of course, you'd have to change the Filename property to hold a valid path for your environment.

Private Sub Form_Load()
    Init1.filename = "C:\mabry\test\test.ini"
    Init1.Application = "My Application"
    Init1.Parameter = "My_Value"
    Label1.Caption = Init1.Value
    Init1.Parameter = "My_Other_Value"
    Label2.Caption = Init1.Value
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Init1.filename = "C:\mabry\test\test.ini"
    Init1.Application = "My Application"
    Init1.Parameter = "My_Value"
    Init1.Value = "some value"
    Init1.Parameter = "My_Other_Value"
    Init1.Value = "some other value"
End Sub

Load/Unload the form once and the .INI file will be created for you.


FAQ - Why do I get an empty string when reading an INI file with IniCon?
Why do I get an empty string when reading an INI file with IniCon?

Frequently Asked Questions

This usually occurs when the control cannot find all of the necessary property values.  For example, if the control cannot find the filename specified (note -- if the .INI file was created using Win95 or WinNT make sure the operating system didn't  append  ".TXT" to the filename and that it's not saved as Unicode).  Another reason might be if the control can't find the Application or the Parameter key. Make sure they are spelled correctly (case does NOT matter).


Registration Information

CREDITS

IniCon was written by James Shields.

CONTACT INFORMATION

Orders, inquiries, technical support, questions, comments, etc. can be sent to mabry@mabry.com on the Internet.  Our mailing address/contact information is:

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Sales: 1-800-99-MABRY (U.S. Only)

Voice: 206-634-1443

Fax: 206-632-0272 or 206-364-3196

Web: http://www.mabry.com

COST

The price of IniCon (control only) is US$15 (US$20 for International orders).  The cost of IniCon and the C/C++ source code (of the control itself) is US$30 (US$35 for International orders).

Prices are subject to change without notice.

DELIVERY METHODS

We can ship this software to you via air mail and/or e-mail.

Air Mail - you will receive disks, a printed manual, and printed receipt if you choose this delivery method.  The costs are:

US$5.00 	US Priority Mail

US$10.00 	AirBorne Express 2nd Day (US deliveries only)

US$15.00 	AirBorne Express Overnight (US deliveries only)

US$45.00 	International AirBorne Express.

E-Mail - We can ship this package to you via e-mail.  You need to have an e-mail account that can accept large file attachments (which includes CompuServe, AOL, and most Internet providers).  If you choose this option, please note: a printed manual is not included.  We will, however, e-mail a receipt to you.

Be sure to include your full mailing address with your order.  Sometimes (on the Internet) the package cannot be e-mailed, so we are forced to send it through the normal mails.

CompuServe E-Mail - CompuServe members can use the software registration forum (GO SWREG) to register this package.  IniCon's SWREG ID number is 833.  The source code version's ID number is 1003.  PLEASE NOTE: When you order through SWREG, we send the registered package to your CompuServe account (not your Internet or AOL account) within a few hours.

ORDER / PAYMENT METHODS

You can order this software by phone, fax, e-mail, mail.  For your convenience, an order form has been provided that you can print out directly from this help file.

Please note that orders must include all information that is requested on our order form.   Your shipment WILL BE DELAYED if we have to contact you for additional information (such as phone number, street address, etc.).

You can pay by credit card (VISA, MasterCard, American Express), check (U.S. dollars drawn on a U.S. bank), cash, International Money Order, International Postal Order, Purchase Order (established business entities only - terms net 30), or wire transfer.

WIRE TRANSFER INFORMATION

Here is the information you need regarding our account for a wire funds transfer:

Bank Name: 	SeaFirst - Stone Way Branch

Bank Address: 	3601 Stone Way North

Seattle, WA  98103

Bank Phone: 	206-585-4951

Account Name: 	Mabry Software, Inc.

Routing Number: 	12000024

Account Number: 	16311706

If you are paying with a wire transfer of funds, please add US$12.50 to your order.  This is the fee that SeaFirst Bank charges Mabry Software.  Also, please ADD ANY ADDITIONAL FEES THAT YOUR BANK MAY CHARGE for wire transfer service. If you are paying with a  wire transfer, we must have full payment deposited to our account before we can ship your order.

Copyright © 1993-1997 by Mabry Software, Inc.


Order Form
 IniCon Order Form

Use the Print Topic... command from the File menu to print this order form.

Mail this 	Mabry Software, Inc.

form to: 	Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272 or 206-364-3196

Internet: mabry@mabry.com

Web: www.mabry.com

Where did you get this copy of IniCon?

____________________________________________________________________

Name: 	____________________________________________________________________

Ship to: 	____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

Phone: 	_________________________________________________________________

Fax: 	_________________________________________________________________

E-Mail: 	_________________________________________________________________

MC/VISA/AMEX: _________________________________________ exp. __________________

P.O. # (if any): 	____________________ Signature ____________________________________

qty ordered 	____ 	REGISTRATION
$15.00 ($20.00 international).  Check or money order in U.S. currency drawn on a U.S. bank.  Add $5.00 per order for shipping and handling.

qty ordered 	____ 	SOURCE CODE AND REGISTRATION
$30.00 ($35.00 international).  Check or money order in U.S. currency drawn on a U.S. bank.  Add $5.00 per order for shipping and handling.


DeleteApp Property Example

In this example, the program will delete a user specified section from WIN.INI. The application property is determined by a text box.  To try this example, paste the code into the Declarations section of a form that contains a text box, a command button, and an IniCon control.  Press F5.  Type the name of the application section you want to delete in the text box.  Finally, press the button and the application section will be deleted.

Note: Be very careful when running this example.  This example will delete data from your WIN.INI file.  Before running it, you should set-up a few sample sections in WIN.INI.

Sub Command1_Click ()
   If Edit1.Text = "" Then
      MsgBox "The first edit box must have text in it."
   Else
      IniCon1.Filename = ""
      IniCon1.Application = Edit1.Text
      IniCon1.DeleteApp = True
   End If
End Sub

In this example, the program will delete a user specified section from SYSTEM.INI.  The application property is determined a text box.  To try this example, paste the code into the Declarations section of a form that contains a text box, a command button, and an IniCon control.  Press F5.  Type the name of the application section you want to delete in the text box.  Finally, press the button and the application section will be deleted.

Note: Be very careful when running this example.  This example will delete data from your SYSTEM.INI file.  Before running it, you should set-up a few sample sections in SYSTEM.INI.

Sub Command1_Click ()
    If Edit1.Text = "" Then
        MsgBox "The first edit box must have text in it."
    Else
        IniCon1.Filename = "SYSTEM.INI"
        IniCon1.Application = Edit1.Text
        IniCon1.DeleteApp = True
    End If
End Sub


DeleteParm Property Example

In this example, the program will delete a user specified parameter from WIN.INI. The application and parameter properties are determined by a pair of text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, and an IniCon control.  Press F5.  Then, type the name of the application section that contains the parameter you want to delete in the first text box.  Then, type the name of the parameter you want to delete in the second text box.  Finally, press the button and the parameter will be deleted.

Note: Be very careful when running this example.  This example will delete data from your WIN.INI file.  Before running it you should set-up a few sample sections and parameters in WIN.INI.

Sub Command1_Click ()
    If Edit1.Text = "" Then
        MsgBox "The first edit box must have text in it."
    ElseIf Edit2.Text = "" Then
        MsgBox "The second edit box must have text in it."
    Else
        IniCon1.Filename = ""
        IniCon1.Application = Edit1.Text
        IniCon1.Parameter = Edit2.Text
        IniCon1.DeleteParm = True
    End If
End Sub

In this example, the program will delete a user specified parameter from SYSTEM.INI. The application and parameter properties are determined by a pair of text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, and an IniCon control.  Press F5.  Then, type the name of the application section that contains the parameter you want to delete in the first text box.  Then, type the name of the parameter you want to delete in the second text box.  Finally, press the button and the parameter will be deleted.

Note: Be very careful when running this example.  This example will delete data from your SYSTEM.INI file.  Before running it you should set-up a few sample sections and parameters in SYSTEM.INI.

Sub Command1_Click ()
    If Edit1.Text = "" Then
        MsgBox "The first edit box must have text in it."
    ElseIf Edit2.Text = "" Then
        MsgBox "The second edit box must have text in it."
    Else
        IniCon1.Filename = "SYSTEM.INI"
        IniCon1.Application = Edit1.Text
        IniCon1.Parameter = Edit2.Text
        IniCon1.DeleteParm = True
    End If
End Sub


WIN.INI and Private INI File Reading Example

In this example, the program will read parameters a user specified section of WIN.INI. The application and parameter properties are determined by two text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, a label, and an IniCon control.  Press F5.  Type the name of the application section you want to examine in the first text box, then type the name of the parameter in the second text box.  Finally, press the button and the value will appear in the label.

Sub Command1_Click ()
   If Edit1.Text = "" Then
      MsgBox "The first edit box must have text in it."
   ElseIf Edit2.Text = "" Then
      MsgBox "The second edit box must have text in it."
   Else
      IniCon1.Filename = ""
      IniCon1.Application = Edit1.Text
      IniCon1.Parameter = Edit2.Text
      Label1.Caption = IniCon1.Value
   End If
End Sub

In this example, the program will read parameters a user specified section of SYSTEM.INI. The application and parameter properties are determined by two text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, a label, and an IniCon control.  Press F5.  Type the name of the application section you want to examine in the first text box, then type the name of the parameter in the second text box.  Finally, press the button and the value will appear in the label.

Sub Command1_Click ()
    If Edit1.Text = "" Then
        MsgBox "The first edit box must have text in it."
    ElseIf Edit2.Text = "" Then
        MsgBox "The second edit box must have text in it."
    Else
        IniCon1.Filename = "SYSTEM.INI"
        IniCon1.Application = Edit1.Text
        IniCon1.Parameter = Edit2.Text
        Label1.Caption = IniCon1.Value
    End If
End Sub


WIN.INI and Private INI File Writing Example

In this example, the program will write parameters to the IniCon Example section of WIN.INI.  The parameter and value properties are determined by two text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, and an IniCon control.  Press F5.  Then, type a string into each text box and press the button.  You can examine the changes to WIN.INI using Notepad or any other text editor.

Sub Command1_Click ()
   If Edit1.Text = "" Then
      MsgBox "The first edit box must have text in it."
   Else
      IniCon1.Filename = ""
      IniCon1.Application = "IniCon Example"
      IniCon1.Parameter = Edit1.Text
      IniCon1.Value = Edit2.Text
   End If
End Sub

In this example, the program will write parameters to the IniCon Example section of a private INI file named INIEXAMP.INI.  The parameter and value properties are determined by two text boxes.  To try this example, paste the code into the Declarations section of a form that contains two text boxes, a command button, and an IniCon control.  Press F5.  Then, type a string into each text box and press the button.  You can examine the changes to INIEXAMP.INI using Notepad or any other text editor.

Sub Command1_Click ()
    If Edit1.Text = "" Then
        MsgBox "The first edit box must have text in it."
    Else
        IniCon1.Filename = "INIEXAMP.INI"
        IniCon1.Application = "IniCon Example"
        IniCon1.Parameter = Edit1.Text
        IniCon1.Value = Edit2.Text
    End If
End Sub


Application Property See Also
See Also

DeleteApp Property

Filename Property

Parameter Property

Value Property


DeleteApp Property See Also
See Also

Application Property

DeleteParm Property


DeleteParm Property See Also
See Also

DeleteApp Property

Parameter Property


Filename Property See Also
See Also

Application Property

Parameter Property

Value Property


Parameter Property See Also
See Also

Application Property

DeleteParm Property

Filename Property

Value Property


Value Property See Also
See Also

Application Property

Filename Property

Parameter Property


Application Property

See Also            WIN.INI and Private INI File Reading Example            WIN.INI and Private INI File Writing Example            Frequently Asked Questions

Description

Specifies the part of the INI file to use.

Syntax

object.Application [= application ]

The syntax of the Application property has these parts:

Part	   	Description

object	An IniCon control.

application	A string expression that holds the name of the application section desired, in the current INI file.

Remarks

This property determines which application section of an INI file to use.  This property must be non-blank.

When a new value is written to this property (and when Parameter is non-blank), a string is read in from the INI file and put into the Value property.

Data Type

String


DeleteApp Property

See Also            DeleteApp Property Example            Frequently Asked Questions

Description

Deletes an application section from an INI file.

Syntax

object.DeleteApp [= boolean ]

The syntax of the DeleteApp property has these parts:

Part	   	Description

object	An IniCon control.

boolean	A boolean flag that, when non-zero, specifies that the INI file application section should be deleted.

Remarks

This property, when set to any non-zero value, deletes the specied application section from the INI file.  The section deleted is determined by the Filename and Application properties.

Data Type

Integer (boolean)


DeleteParm Property

See Also            DeleteParm Property Example            Frequently Asked Questions

Description

Deletes a parameter entry from an INI file.

Syntax

object.DeleteParm [= boolean ]

The syntax of the DeleteParm property has these parts:

Part	   	Description

object	An IniCon control.

boolean	A boolean flag that, when non-zero, specifies that the INI file parameter should be deleted.

Remarks

This property, when set to any non-zero value, deletes the specied parameter section from the INI file.  The parameter deleted is determined by the Filename, Application, and Parameter properties.

Data Type

Integer (boolean)


Filename Property

See Also            WIN.INI and Private INI File Reading Example            WIN.INI and Private INI File Writing Example            Frequently Asked Questions

Description

Specifies which INI file to use.

Syntax

object.Filename [= filename ]

The syntax of the Filename property has these parts:

Part	   	Description

object	An IniCon control.

filename	A string expression that is either blank (for WIN.INI) or holds a full path and filename for a private INI file.

Remarks

This property determines if IniCon uses a private INI file or WIN.INI.  If this property is blank, profile strings are read from and written to WIN.INI.  If this field is not blank, profile strings are written to and read from the file specified by this property.

When a new value is written to this property (and when Application and Parameter are non-blank), a string is read in from the INI file and put into the Value property.

Data Type

String


Parameter Property

See Also            WIN.INI and Private INI File Reading Example            WIN.INI and Private INI File Writing Example            Frequently Asked Questions

Description

Specifies which entry in an application section to use.

Syntax

object.Parameter [= parameter ]

The syntax of the Parameter property has these parts:

Part	   	Description

object	An IniCon control.

parameter	A string expression that specifies which parameter to use, within an application section.

Remarks

This property determines which line in an application section of an INI file to use.  This property must be non-blank.

When a new value is written to this property (and when Application is non-blank), a string is read in from the INI file and put into the Value property.

Data Type

String


Value Property

See Also            WIN.INI and Private INI File Reading Example            WIN.INI and Private INI File Writing Example            Frequently Asked Questions

Description

Value of the profile string identified by Filename, Application, and Parameter properties.

Syntax

object.Value [= value ]

The syntax of the Value property has these parts:

Part	   	Description

object	An IniCon control.

value	A string expression that holds the new value for the INI file parameter.

Remarks

This property serves two purposes: to read the value of a profile string from an INI file, and to write a profile string to an INI file.  When a program reads this property, the profile string is read from the INI file.  When a program writes to this property, the value is written to the INI file.

Data Type

String


Version Property

Frequently Asked Questions

Description

Shows the version of the control.

Syntax

object.Version

The syntax of the Version property has these parts:

Part	   	Description

object	An IniCon control.

Remarks

This property holds the current version of the control.  It is read-only and available at both design-time and run-time.

Data Type

String


Getting Custom Controls Written

If you or your organization would like to have custom controls written, you can contact us at the following:

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272 or 206-364-3196

Internet: mabry@mabry.com

You can also contact Zane Thomas.  He can be reached at:

Zane Thomas

Post Office Box 121

Indianola, WA  98342

Internet: zane@mabry.com


Licensing Information

Legalese Version

Mabry Software grants a license to use the enclosed software to the original purchaser.  Copies may be made for back-up purposes only.  Copies made for any other purpose are expressly prohibited, and adherence to this requirement is the sole responsibility of the purchaser.

Customer written executable applications containing embedded Mabry products may be freely distributed, without royalty payments to Mabry Software, provided that such distributed Mabry product is bound into these applications in such a way so as to prohibit separate use in design mode, and that such Mabry product is distributed only in conjunction with the customers own software product.  The Mabry Software product may not be distributed by itself in any form.

Neither source code for Mabry Software products nor modified source code for Mabry Software products may be distributed under any circumstances, nor may you distribute .OBJ, .LIB, etc. files that contain our routines. This control may be used as a constituent control only if the compound control thus created is distributed with and as an integral part of an application.  Permission to use this control as a constituent control does not grant a right to distribute the license (LIC) file or any other file other than the control executable itself. This license may be transferred to a third party only if all existing copies of the software and its documentation are also transferred.

This product is licensed for use by only one developer at a time.  Mabry Software expressly prohibits installing this product on more than one computer if there is any chance that both copies will be used simultaneously.  This restriction also extends to installation on a network server, if more than one workstation will be accessing the product.  All developers working on a project which includes a Mabry Software product, even though not working directly with the Mabry product, are required to purchase a license for that Mabry product.

This software is provided as is.  Mabry Software makes no warranty, expressed or implied, with regard to the software.  All implied warranties, including the warranties of merchantability and fitness for a particular use, are hereby excluded.

MABRY SOFTWARE'S LIABILITY IS LIMITED TO THE PURCHASE PRICE.  Under no circumstances shall Mabry Software or the authors of this product be liable for any incidental or consequential damages, nor for any damages in excess of the original purchase price.

To be eligible for free technical support by telephone, the Internet, CompuServe, etc. and to ensure that you are notified of any future updates, please complete the enclosed registration card and return it to Mabry Software.

English Version

We require that you purchase one copy of a control per developer on a project.  If this is met, you may distribute the control with your application royalty free.  You may never distribute the LIC file.  You may not change the product in any way that removes or changes the requirement of a license file.

We encourage the use of our controls as constituent controls when the compound controls you create are an integral part of your application.  But we don't allow distribution of our controls as constituents of other controls when the compound control is not part of an application.  The reason we need to have this restriction is that without it someone might decide to use our control as a constituent, add some trivial (or even non-trivial) enhancements and then sell the compound control.  Obviously there would be little difference between that and just plain reselling our control.

If you have purchased the source code, you may not re-distribute the source code either (nor may you copy it into your own project).  Mabry Software retains the copyright to the source code.

Your license is transferable.  The original purchaser of the product must make the transfer request.  Contact us for further information.

The sample versions of our products are intended for evaluation purposes only.  You may not use the sample version to develop completed applications.